<!DOCTYPE html>
<html lang="en">

<head>
  <meta charset="UTF-8">
  <meta name="viewport" content="width=device-width, initial-scale=1.0">
  <meta http-equiv="X-UA-Compatible" content="ie=edge">
  <title>Document</title>
</head>

<body>
  <script>
    /* // 1
    var a = [];
    for (var i = 0; i < 10; i++){
      a[i] = function(){
        console.log(i)
      }
    }
    a[6]() */
    /* // 2
    var tmp = 123;
    if(true){
      console.log(tmp);
      let tmp
    } */
    // 3
    /* var arr = [1, 12, 34, 32, 89, 4, 2, 101,0]
    let a
    arr.map((item, index, arr) => {
      if (arr[index] > arr[index + 1]) {
        a = arr[index+1]
      }else if(arr[index] < arr[index + 1]){
        a = arr[index]
      }
    })
    // console.log(a);
    
    let b = [12, 34, 32, 89, 4].sort((a, b) => a - b)

    console.log(b); */
    /* var a = 1;
    var obj = {
      a:20,
      say:()=> console.log(this.a)
    }
    obj.say() */
  </script>
</body>

</html>